/* Sspai Web Theme A theme to [sspai](ssp.ai) default theme. Developed by Codegass(wchweichenhao@gmial.com) & Yves(yves@sspai.com) Download Cuto on the App Store and Google Play! */
@font-face {
    font-family: 'AlibabaPuHuiTi';
    src: url('/res/font/AlibabaPuHuiTi.woff2') format('woff2');
  }

@font-face {
    font-family: 'SourceHanSerifSC';
    src: url('/res/font/SourceHanSerifSC.otf') format('opentype');
  
}

:root {
    --primary: #000000;
    --secondary: #333333;
    --accent: #ffffff;
    --light: #ffffff;
    --dark: #000000;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --blue-accent: #4a90e2;
    --blue-light: #7bb3f0;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    color: var(--light);
    min-height: 100vh;
}

.container {
    margin: 0 100px;
    padding-top: 100px; /* 添加顶部内边距，避免被导航栏覆盖 */
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0px 50px;
}

.logo i {
    font-size: 2.5rem;
    color: var(--blue-accent);
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 700;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-bar {
    display: flex;
    gap: 15px;
    margin: 50px 200px;
}

.search-bar input {
    flex: 1;
    padding: 15px 20px;
    border: 1px solid #444;
    border-radius: 50px;
    font-size: 1.1rem;
    background: rgba(50, 50, 50, 0.9);
    box-shadow: var(--shadow);
    color: #fff;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

.search-bar input::placeholder {
    color: #aaa;
}

.search-bar button {
    background: var(--blue-accent);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.search-bar button:hover {
    background: var(--blue-light);
    transform: translateY(-2px);
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.toggle-btn {
    background: rgba(50, 50, 50, 0.9);
    border: 1px solid #444;
    color: #ddd;
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.toggle-btn.active {
    background: var(--blue-accent);
    color: white;
    border-color: var(--blue-accent);
}

.bookshelf {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.folder-view {
    display: block;
}

.folder {
    background: rgba(50, 50, 50, 0.9);
    border: 1px solid #444;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.folder-header {
    padding: 15px 20px;
    border-bottom: 1px solid #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.2rem;
    transition: var(--transition);
}

.folder-header i {
    color: var(--blue-accent);
    transition: transform 0.3s ease;
}

.folder-header:hover {
    background: linear-gradient(to right, rgba(74, 144, 226, 0.3), rgba(100, 160, 255, 0.3));
}

.folder-content {
    display: none;
    padding: 15px 20px;
}

.folder-content.expanded {
    display: block;
}

.folder-header.expanded i {
    transform: rotate(90deg);
}

.folder-books {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.folder-book {
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px; /* 增加内边距 */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center; /* 内容居中 */
    text-align: center; /* 文字居中 */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    position: relative;
}

.folder-book:hover {
    transform: translateY(-8px) scale(1.05); /* 增强悬停效果 */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    border-color: var(--blue-accent);
    z-index: 1;
}

.folder-book .book-icon {
    font-size: 3rem; /* 增大图标 */
    color: var(--blue-accent); /* 统一主题色 */
    margin-bottom: 15px;
    transition: color 0.3s;
}

.folder-book:hover .book-icon {
    color: var(--blue-light); /* 悬停颜色渐变 */
}

.folder-book .book-title {
    font-size: 1.1rem; /* 增大字体 */
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 0 3px rgba(255,255,255,0.2);
}

.folder-book .book-author,
.folder-book .book-publisher {
    font-size: 0.85rem;
    color: #ccc;
    margin: 4px 0;
    opacity: 0.9;
}

.folder-book::after { /* 添加装饰元素 */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--blue-accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.folder-book:hover::after {
    opacity: 1;
}

/* 容器样式，用于居中或布局 */
.book-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  justify-content: center;
}

/* 容器样式，用于居中或布局 */
.book-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  justify-content: center;
  background-color: #000; /* 黑色背景 */
  color: #fff; /* 默认白色文字 */
}

/* 容器样式，用于居中或布局 */
.book-container {
  display: flex;
  flex-wrap: wrap;
  gap: 50px; /* 增大间距，防止3D效果时重叠 */
  padding: 50px; /* 增加容器内边距 */
  justify-content: center;
  background-color: #000; /* 黑色背景 */
  color: #fff; /* 默认白色文字 */
  /* 为子元素设置透视视角，这是实现3D效果的关键 */
  perspective: 1000px;
}
/* 书籍卡片整体样式 - 黑暗主题 */
.book-card {
  width: 200px;
  background: #1a1a1a; /* 深灰黑色背景 */
  border-radius: 4px 12px 12px 4px;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.6),
    0 6px 20px rgba(0,0,0,0.4),
    inset -4px 0 4px rgba(255,255,255,0.05); /* 微调内阴影为亮色 */
  padding: 20px 15px;
  border-left: 8px solid #333; /* 深色书脊 */
  position: relative;
  transition: transform 0.3s ease;
  font-family: 'Georgia', serif;
  overflow: hidden;
  color: #e0e0e0; /* 主文字颜色 */
}

/* 悬停效果 */
.book-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 
    0 10px 20px rgba(0,0,0,0.8),
    0 15px 35px rgba(0,0,0,0.6),
    inset -4px 0 4px rgba(255,255,255,0.1);
}

/* 书封样式 - 深色皮革质感 */
.book-cover {
  background: linear-gradient(145deg, #2c2220, #1e1715); /* 深棕黑渐变 */
  border-radius: 2px 8px 8px 2px;
  padding: 25px 15px;
  box-shadow: 
    inset 0 0 10px rgba(0,0,0,0.8),
    0 2px 5px rgba(0,0,0,0.4);
  position: relative;
  margin-bottom: 20px;
  border: 1px solid #3a3a3a; /* 添加边框增强轮廓 */
}

/* 封面装饰线 - 金色细线 */
.book-cover::before {
  content: "";
  position: absolute;
  top: 10%;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(to right, transparent, #d4af37, transparent); /* 金线效果 */
  border-radius: 1px;
}

/* 书本图标样式 - 金色 */
.book-cover-img {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  color: #d4af37; /* 金色 */
  font-size: 3.5rem;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.4); /* 金色辉光 */
}

/* 标题样式 - 白色带微光 */
.book-title {
  font-weight: bold;
  font-size: 1.2rem;
  color: #ffffff;
  margin: 0 0 10px;
  line-height: 1.3;
  text-shadow: 0 0 5px rgba(255,255,255,0.1);
  border-bottom: 1px solid #444; /* 深灰分隔线 */
  padding-bottom: 8px;
}

/* 作者和出版社样式 - 浅灰色 */
.book-author, .book-publisher {
  font-size: 0.9rem;
  color: #b0b0b0;
  margin: 5px 0;
  letter-spacing: 0.3px;
}

/* 图标装饰 - 金色 */
.book-author::before {
  content: "✒ ";
  color: #d4af37;
  opacity: 0.9;
}

.book-publisher::before {
  content: "🏢 ";
  color: #d4af37;
  opacity: 0.9;
}

/* 书角效果 - 金色 */
.book-card::after {
  content: "";
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid #d4af37;
  border-right: 2px solid #d4af37;
  border-radius: 0 0 4px 0;
}

/* 添加书本底部投影增强立体感 */
.book-card::before {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 15px;
  right: 15px;
  height: 10px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  filter: blur(5px);
  z-index: -1;
}







footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid #444;
    color: #aaa;
}

.folder-navigation {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: rgba(50, 50, 50, 0.9);
    border-radius: 8px;
    border: 1px solid #444;
}

.folder-nav-item {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

.folder-nav-item:hover {
    background: rgba(74, 144, 226, 0.3);
}

.folder-nav-separator {
    margin: 0 8px;
    color: #bbb;
}

/* 新增：书籍封面预览效果 */
.book-cover-preview {
    position: relative;
    height: 120px; /* 调整高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px; /* 减小外边距 */
    width: 90px; /* 调整宽度 */
    perspective: 1000px;
}

.book-cover-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #3a5fcd, #4a90e2);
    border-radius: 4px;
    transform: rotateY(-10deg);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.book:hover .book-cover-img {
    transform: rotateY(0deg) translateZ(10px);
    box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.5);
}

.book-cover-img i {
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem; /* 减小图标大小 */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
    }

    .stats {
        width: 100%;
        justify-content: space-around;
    }

    .bookshelf {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .book {
        height: 300px; /* 调整移动端高度 */
    }

    .book-title {
        font-size: 1rem;
    }

    .book-cover {
        font-size: 3rem;
    }
}